﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Common.Master" CodeBehind="OilSearchZongheVol.aspx.cs" Inherits="Web.Views.DataManage.OilSearchZongheVol" %>
<%@ Register TagName="SearchControl" TagPrefix="s" Src="~/UserControls/SearchControl.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="../../Javascript/UserControls.js"></script>
    <style type="text/css">
        #cblSelectColsDiv td
        {
            border:0 none
        }
        html
        {
            width:99%;
            height:99%;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $("#easyuiAccordion1").accordion()
           .accordion("getPanel", "选择需要导出的列")
           .panel("collapse");
        });
    </script>
    <script type="text/javascript">
        function btnShowFilter_Click() {
            if ($("#btnShowFilter").val() == '展开过滤') {
                OpenDialog();
                $("#btnShowFilter").val('隐藏过滤');
            }
            else {
                HideDialog();
                $("#btnShowFilter").val('展开过滤');
            }
        }
        function selectAll() {
            $("#colsCheckBoxList input[type='checkbox']").attr('checked', true);
        }
        function unSelectAll() {
            $("#colsCheckBoxList input[type='checkbox']").attr('checked', false);
        }

        function viewClick(archiveId) {
            var flag = false;
            if (archiveId != null) {
                var archivetype;
                var search = window.location.search;
                if (search.charAt('0') == '?' && search.length > 1) {
                    search = search.slice(1);
                    var queryparas = search.split('&');
                    for (i = 0; i < queryparas.length; i++) {
                        var paraArr = queryparas[i].split('=');
                        if (paraArr.length == 2) {
                            if (paraArr[0].toLowerCase() == 'archivetype') {
                                archivetype = paraArr[1];
                                flag = true;
                                window.open("../ArchiveHistory/ArchiveVolHistoryEdit.aspx?readonly=yes&archiveId=" + archiveId + '&archivetype=' + archivetype + '&archivehistoryType=7101', "", "titlebar = no,resizable= yes, scrollbars = yes");
                                return;
                            }
                        }
                    }
                }
            }
            if (!flag) {
                alert("Query Parameters Error");
            }
        }

        function editClick(archiveId) {
            var flag = false;
            if (archiveId != null) {
                var archivetype;
                var search = window.location.search;
                if (search.charAt('0') == '?' && search.length > 1) {
                    search = search.slice(1);
                    var queryparas = search.split('&');
                    for (i = 0; i < queryparas.length; i++) {
                        var paraArr = queryparas[i].split('=');
                        if (paraArr.length == 2) {
                            if (paraArr[0].toLowerCase() == 'archivetype') {
                                archivetype = paraArr[1];
                                flag = true;
                                window.open("../ArchiveHistory/ArchiveVolHistoryEdit.aspx?archiveId=" + archiveId + '&archivetype=' + archivetype + '&archivehistoryType=7101', "", "titlebar = no, resizable= yes, scrollbars = yes");
                                return;
                            }
                        }
                    }
                }
            }
            if (!flag) {
                alert("Query Parameters Error");
            }
        }

        function delClick() {
            return window.confirm("确定删除？");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style=" padding-left:6px; padding-right:6px;">
        <div style=" overflow:hidden; width:90%;">
            <s:SearchControl id="sch" runat="server"></s:SearchControl>
            <button type="button" class="sexybutton" id="btnShowFilter" onclick="btnShowFilter_Click();" style=" height:30px;">展开过滤</button>
            <span style=" color:Red; vertical-align:45%; padding-left:2px; ">*点开展开条件查询</span>
        </div>
    </div>
    <div style=" padding-top:6px; padding-left:6px; padding-right:6px; padding-bottom:2px; height:30px;">
        <div id="easyuiAccordionContainer" style="position:absolute;">
            <div id="easyuiAccordion1" >
                <div title="选择需要导出的列" id="cblSelectColsDiv" style=" height:30px; width:300px;" selected="false">
                    <div>
                        <div>
                            <input type="button" class="btn2" value="全选" onclick="selectAll();" />
                            <input type="button" class="btn2" value="反选" onclick="unSelectAll();"/>
                        </div>
                        <div id="colsCheckBoxList">
                            <asp:CheckBoxList ID="cblSelectCols" runat="server" RepeatLayout="Table" RepeatColumns="3"></asp:CheckBoxList>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div style=" position:absolute; left:365px;height:30px;">
            <div >
                <span style="position:relative;">
                <asp:RadioButtonList ID="IsExportAllRowsHasSelected" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                    <asp:ListItem Text="所有页选择的行" Value="1" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="当前页选择的行" Value="0"></asp:ListItem>
                </asp:RadioButtonList>
                <button type="button" class="sexybutton" runat="server" id="btnExportToExcel" onserverclick="ExportButton_Click"><span><span><span class="add">导出为Excel</span></span></span></button>
                <asp:HyperLink ID="ImportData" runat="server" CssClass="add">批量导入</asp:HyperLink>
                </span>
            </div>
        </div>
    </div>
    <div runat="server" id="divAgent" style=" padding-left:6px; padding-right:6px;">
    <h3>综合卷</h3>
        <ep:EPGridView ID="gv_ArchiveFileList" runat="server" Width="100%" AutoGenerateColumns="False" OnRowDataBound="gv_ArchiveFileList_OnDataBound"
            dataSortExpression="" EnableEmptyContentRender="True" EnableModelValidation="True"
            Goto="0" GvPageCount="0" ShowCheckBox="true" DataKeyNames="DataID" PagerSettings-Visible="false" OnRowDeleted="gv_ArchiveFileList_RowDeleted" OnRowDeleting="gv_ArchiveFileList_RowDeleting">
            <Columns>
                <asp:BoundField DataField="DataID" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" />
                <asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="5%" HeaderStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <a href="#" id='view_<%# Eval("DataID") %>' onclick="viewClick('<%# Eval("DataID") %>');" style=" display:inline-block;">查看</a>
                        <a href="#" id='edit_<%# Eval("DataID")%>' onclick="editClick('<%# Eval("DataID") %>');" style=" display:inline-block;">编辑</a>
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Eval("DataID") %>'  OnClick="Deleted_Click" OnClientClick="return delClick();" Enabled="false" Visible="false">删除</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="题名" DataField="Title" HeaderStyle-Width="18%" HeaderStyle-HorizontalAlign="Center"></asp:BoundField>
                <asp:BoundField HeaderText="档号" DataField="ArchiveNum" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField HeaderText="载体类型" DataField="F_CARRIERTYPE" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField HeaderText="保管期限" DataField="F_KeepTime" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField HeaderText="密级" DataField="F_SecurityType" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField HeaderText="文件日期" DataField="RecordTime"  DataFormatString="{0:yyyy-MM-dd}"
                     HtmlEncode="false" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                 <asp:BoundField HeaderText="起日期" DataField="StartTime"  DataFormatString="{0:yyyy-MM-dd}"
                            HtmlEncode="false" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                 <asp:BoundField HeaderText="止日期" DataField="EndTime"  DataFormatString="{0:yyyy-MM-dd}"
                            HtmlEncode="false" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                  <asp:BoundField HeaderText="归档人" DataField="FileUser" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField HeaderText="归档单位" DataField="FileOrgId" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="7%" HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
            </Columns>
        </ep:EPGridView>
         <div style="overflow:hidden;" >
        <ep:AspNetPager SubmitButtonText=" GO " ID="FileSearch" Height="26px"    Width="100%" CssClass="yahoo2"
            runat="server" PageSize="10" LayoutType="Table" ShowCustomInfoSection="Right"
            CustomInfoClass="custom" CustomInfoStyle=" clear:both;" ShowPageIndexBox="Always"
            SubmitButtonImageUrl="../Images/go.png" ShowPageIndex="true" PageIndexBoxType="TextBox"
            CustomInfoHTML="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条"
            OnPageChanging="FileSearch_PageChanging" AlwaysShow="true" OnPageSizeChanging="FileSearch_PageSizeChanging">
        </ep:AspNetPager>
    
       
        <div style=" height:5px;"></div>
    </div>
    </div>
    <asp:HiddenField ID="IsExportRowsOrColumnsEmpty" Value="false" runat="server"/>
</asp:Content>

